package com.starkuz.tools;


import org.apache.commons.net.whois.WhoisClient;

public class WhoIs {
    public static final String WHOIS_SERVER = "internic.net";
    public static final int WHOIS_PORT = 43;

    public static void main(String[] args) throws Exception {

        String nameToQuery = "avajava.com";

        WhoisClient whoisClient = new WhoisClient();
        whoisClient.connect(WHOIS_SERVER, WHOIS_PORT);
        String results = whoisClient.query(nameToQuery);

        System.out.println(results);
    }
}
